import request from "@/utils/request";
import { param } from "../../utils";

// 查询【线索库列表】列表
export function listClueLibrary(params) {
  return request({
    url: "/clue/admin/selectPageClue",
    method: "get",
    params,
  });
}

// 查询【线索库列表】列表
export function getRecordPersonnel(params) {
  return request({
    url: "/clue/admin/selectPageTypeInClue",
    method: "get",
    params,
  });
}

// 跟进线索id查用户信息
export function getClueIdToUserInfo(params) {
  return request({
    url: "/user/admin/getUserByClueId",
    method: "get",
    params,
  });
}

// 获取用户发布信息
export function getFindCarInfo(params) {
  return request({
    url: "/car/demand/admin/getUserCarDemand",
    method: "get",
    params,
  });
}

// 跟进用户手机号查询成交列表
export function getConsultancyInfo(params) {
  return request({
    url: "/clue/admin/selectCompleteUserClue",
    method: "get",
    params,
  });
}

// 跟进用户手机号查询咨询列表
export function getClueInfo(params) {
  return request({
    url: "/clue/admin/getUserClueByUserPhone",
    method: "get",
    params,
  });
}

// 查询线索详情
export function getClueLibraryDetail(params) {
  return request({
    url: "/clue/admin/getClueDetail",
    method: "get",
    params,
  });
}

// 提交跟进报价记录
export function submitClueOffer(data) {
  return request({
    url: "/clue/admin/submitClueOffer",
    method: "post",
    data,
  });
}

// 找车报价列表
export function carFindQuotes(params) {
  return request({
    url: "/car/demand/admin/getQuote",
    method: "get",
    params,
  });
}

// 找车联系列表
export function carFindCallLogs(params) {
  return request({
    url: "/car/demand/admin/getCallLog",
    method: "get",
    params,
  });
}

// 修改线索
export function submitUpdateClue(data) {
  return request({
    url: "/clue/admin/updateClue",
    method: "post",
    data,
  });
}

// 新增线索
export function addClue(data) {
  return request({
    url: "/clue/admin/saveClue",
    method: "post",
    data,
  });
}

// 获取销售人员姓名
export function getMarketList(params) {
  return request({
    url: "/user/admin/getMarketPersonnel",
    method: "get",
    params,
  });
}

// 分配
export function manualDistribution(data) {
  return request({
    url: "/clue/admin/manualDistribution",
    method: "post",
    data,
  });
}

// 导入
export function importClueList(data) {
  return request({
    url: "/clue/admin/batchImportClue",
    method: "post",
    data,
  });
}

// 确认战败
export function clueAffirmDefeat(params) {
  return request({
    url: "/clue/admin/clueAffirmDefeat",
    method: "get",
    params,
  });
}

// 确认无效
export function notarizeInvalid(params) {
  return request({
    url: "/clue/admin/notarizeInvalid",
    method: "get",
    params,
  });
}

// 根据用户id查询用户信息
export function getUserIdToInfo(params) {
  return request({
    url: "/user/admin/getUserByUserId",
    method: "get",
    params,
  });
}

/**查询统计信息 */
export function getCountDetail(params) {
  return request({
    url: "/clue/admin/clueDataCount",
    method: "get",
    params,
  });
}

/**找车列表查询 */
export function getUserBuySellCar(params) {
  return request({
    url: "/admin/BuySellCar/getUserBuySellCar",
    method: "get",
    params,
  });
}

/**找车联系列表 */
export function listbuySellCarId(params) {
  return request({
    url: "/admin/BuySellCarLog/list",
    method: "get",
    params,
  });
}
